import { createApp } from 'vue'
import { createPinia } from 'pinia'

import App from './App.vue'
import router from './router'
// 重置样式
import 'normalize.css'
import '@/assets/css/reset.css'
import '@/assets/css/common.css'
// 字体图标
import '@/assets/fonts/iconfont.css'

// element-plus icon
import * as ElementPlusIconsVue from '@element-plus/icons-vue'

// element-plus主题设置
import 'element-plus/theme-chalk/dark/css-vars.css'
import '@/assets/element/dark.scss'

// 国际化语言
import I18n from '@/lang/i18n'

import 'element-plus/theme-chalk/el-loading.css'
import 'element-plus/theme-chalk/el-message.css'
import 'element-plus/theme-chalk/el-notification.css'
import 'element-plus/theme-chalk/el-message-box.css'

const app = createApp(App)

for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}

app.use(createPinia())
app.use(router)
app.use(I18n)
app.mount('#app')
